package com.qf.util;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 2019/12/4
 * Administrator
 * springboot1204
 * 面向对象面向君  不负代码不负卿
 */
@ControllerAdvice//设置当前异常为全局异常，任何一个controller有异常都会执行当前代码
public class ExceptionUtil {
   /* @ExceptionHandler(Exception.class)
    @ResponseBody
    public String ex(){
        return "error";
    }*/
}
